package com.gitee.feizns.itrip.personal.utils.service.impl;

import com.gitee.feizns.itrip.personal.utils.service.PhoneService;
import com.gitee.feizns.itrip.personal.utils.bean.PhoneBean;

import java.util.HashMap;

/**
 * @author feizns
 * @since 2018/12/28 0028
 */
public class PhoneServiceImpl implements PhoneService {

    private PhoneBean phoneBean;

    public void setPhoneBean(PhoneBean phoneBean) {
        this.phoneBean = phoneBean;
    }

    public PhoneServiceImpl(PhoneBean phoneBean) {
        this.phoneBean = phoneBean;
    }

    @Override
    public HashMap<String, Object> send(String to, Object... placeholder) {
        String code = placeholder != null && placeholder.length > 0 ? placeholder[0].toString() : null;
        return phoneBean.send(to, code);
    }

}